package com.luke.exercise.aop;

public class HelloProxy implements Hello1 {

    private Hello1 hello;
    
    public HelloProxy() {
        hello = new HelloImpl();
    }
    
    public void say(String name) {
        before();
        hello.say(name);
        after();
    }
    
    private void before() {
        System.out.println("before");
    }
    
    private void after() {
        System.out.println("after");
    }
    
    public static void main(String[] args) {
        Hello1 helloProxy = new HelloProxy();
        helloProxy.say("luke");
    }

}
